﻿using ZQNB.Common;
using ZQNB.Entity.Accounts;

namespace ZQNB.BaseLib.Accounts
{
    /// <summary>
    /// 账号的服务
    /// </summary>
    public interface IAccountService
    {
        bool Validate(string identity, string password);
        Account GetAccount(string identity);
        bool ResetPassword(string identity);
        bool ResetPassword(string identity, string defaultPassword);
        bool ChangePassword(string identity, string oldPassword, string newPassword);
        void LockAccount(string identity);
        void UnLockAccount(string identity);

        void NotifyLogin(string loginName);

        void NotifyLogout(string loginName);

        MessageResult Create(Account account);
        MessageResult Delete(string identity);
        MessageResult Update(Account account);
    }
}